/* -*- coding: utf-8; indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- */
/* vim:set fileencodings=utf-8 tabstop=4 expandtab shiftwidth=4 softtabstop=4: */

#include <stdio.h>
#include <string.h>

#include "hmac-glib.h"
#include "hmac.h"

void hmac_sha1_glib (const gchar *key, const gchar *message, guchar **output, gint *output_length)
{
    g_assert(output != NULL);
    g_warn_if_fail(*output == NULL);
    g_assert(output_length != NULL);

    *output = g_malloc0(64);

    hmac_sha1(key, strlen(key), message, strlen(message), *output);

    *output_length = 20;

    return;
}
